
$(document).ready(function(){
    var $token = window.localStorage.getItem("token");
    var $mid= window.localStorage.getItem("mid");
    var $did= commondata.commonaddrbook;
    var $groupid= window.localStorage.getItem("groupId");
    /*alert($token+" "+$mid+" "+$did+" "+$groupid);*/
    var Post ="mid="+$mid+"&groupid="+$groupid+"&pagesize=10&token="+$token+"&did="+$did;
	$.ajax({
		url:'../../api/getcollectlist',
		type:'post',
		data:Post,
		success:function(msg){
			console.log(msg);
			if(msg.code ==100){
				for(var i=0;i<msg.data.length;i++){
					var li  = document.createElement("li");
					li.innerHTML='<a href="../mine/selvesInfo.html?groupid='+
	    			msg.data[i].n0+'mid='+
	    			msg.data[i].n1.split(",")[4]+'">'+'<div class="usualAddLeft" id="usualAddImg"><img src="'+msg.data[i].n1.split(",")[0]+'" title="小清新" alt="小清新"/></div>'+
					'<div class="usualAddRight">'+
	                   '<h5 id="name">'+msg.data[i].n1.split(",")[1]+'</h5>'+
	                   '<p id="company">'+msg.data[i].n1.split(",")[2]+'</p>'+
	               '</div>'+
					'</a>';
					$("#usualAddressList").append(li);
				}
				
			}
		}
	});
});
